package com.wl.zlmanage.mapper;


import com.wl.zlmanage.bean.ApplyInfo;
import com.wl.zlmanage.bean.ApprovalInfo;
import com.wl.zlmanage.bean.BSType;
import com.wl.zlmanage.bean.ExpendInfo;
import com.wl.zlmanage.bean.MatchedQyInfo;
import com.wl.zlmanage.bean.Notice;
import com.wl.zlmanage.bean.SignTypeInfo;
import com.wl.zlmanage.bean.ZlSignInfo;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface SignCustomMapper {

    List<ZlSignInfo> getSignCustomList(@Param("userId") Integer userId,
        @Param("page") int page,
        @Param("limit") int limit, @Param("search") String search,
        @Param("approvalState") Integer approvalState, @Param("userDept") Integer userDept,
        @Param("signType") Integer signType);

    Integer getSignCustomListCount(@Param("userId") Integer userId,
        @Param("page") int page,
        @Param("limit") int limit, @Param("search") String search,
        @Param("approvalState") Integer approvalState, @Param("userDept") Integer userDept,
        @Param("signType") Integer signType);

    List<BSType> getAllBigType();

    List<BSType> getAllSmallType(@Param("parentId") Integer parentId);

    void saveSign(ZlSignInfo zlSignInfo);

    Integer editSign(@Param("zlSignInfo") ZlSignInfo zlSignInfo);

    Integer editQySign(@Param("zlSignInfo") ZlSignInfo zlSignInfo);

    Integer askApproval(@Param("signId") Integer signId,
        @Param("approvalState") Integer approvalState);

    Integer saveApprovalInfo(@Param("approvalInfo") ApprovalInfo approvalInfo);

    List<ApprovalInfo> getApprovalBySignId(@Param("signId") Integer signId);

    ZlSignInfo getSignById(@Param("signId") Integer signId);

    Integer deleteSignById(@Param("signId") Integer signId);

    Integer deleteApprovalInfo(@Param("signId") Integer signId);

    List<ExpendInfo> getExpend(@Param("signId") Integer signId,
        @Param("page") int page,
        @Param("limit") int limit);

    Integer getExpendCount(@Param("signId") Integer signId,
        @Param("page") int page,
        @Param("limit") int limit);

    void addExpendInfo(ExpendInfo expendInfo);

    void addExpendInfoNew(ExpendInfo expendInfo);

    Integer deleteExpend(@Param("expendId") Integer expendId);

    Double getExpendTatal(@Param("signId") Integer signId);


    List<SignTypeInfo> getSignType(@Param("signId") Integer signId,
        @Param("page") int page,
        @Param("limit") int limit);

    Integer getSignTypeCount(@Param("signId") Integer signId);

    Integer saveSignType(@Param("signTypeInfoList") List<SignTypeInfo> signTypeInfoList);

    Integer deleteSignType(@Param("signTypeId") Integer signTypeId);

    Integer deleteAllSignType(@Param("signId") Integer signId);

    Integer deleteAllExpend(@Param("signId") Integer signId);

    List<ZlSignInfo> getCanMatchSignCustomList(
        @Param("page") int page,
        @Param("limit") int limit, @Param("search") String search,
        @Param("approvalState") Integer approvalState,
        @Param("signType") Integer signType);

    Integer getCanMatchSignCustomListCount(@Param("search") String search,
        @Param("approvalState") Integer approvalState,
        @Param("signType") Integer signType);

    List<ZlSignInfo> getMatchedSignList(@Param("page") int page,
        @Param("limit") int limit, @Param("signId") Integer signId);

    Integer getMatchedSignListCount(@Param("signId") Integer signId);

    List<ZlSignInfo> getCanMatchPersonSignCustomList(
        @Param("page") int page,
        @Param("limit") int limit, @Param("search") String search,
        @Param("approvalState") Integer approvalState,
        @Param("signType") Integer signType);

    Integer getCanMatchPersonSignCustomListCount(@Param("search") String search,
        @Param("approvalState") Integer approvalState,
        @Param("signType") Integer signType);

    Integer addSignMatchInfo(@Param("paramMap") Map<String, Object> paramMap);

    Integer updateMatchState(@Param("signId") Integer signId,
        @Param("matchSign") Integer matchSign);

    Integer deleteMatchInfo(@Param("signId") Integer signId,
        @Param("personSignId") Integer personSignId);

    Integer getSignTypeCountNum(@Param("signId") Integer signId);

    Integer getMatchedSignCount(@Param("signId") Integer signId);

    Double getApplySumBySignId(@Param("signId") Integer signId);

    List<SignTypeInfo> getSignTypeBySignId(@Param("signId") Integer signId);

    Integer saveNotice(@Param("noticeList") List<Notice> noticeList);

    List<Notice> getNoticeList(@Param("page") int page, @Param("limit") int limit);

    Integer getNoticeListCount();

    Integer stopOverSign(@Param("signId") Integer signId);

    List<MatchedQyInfo> getMatchedQyInfo(@Param("signId") Integer signId);

    List<ZlSignInfo> getMatchedPersonList(@Param("signId") Integer signId, @Param("page") int page,
        @Param("limit") int limit);

    Integer getMatchedPersonListCount(@Param("signId") Integer signId);

    List<ZlSignInfo> getSignCustomById(@Param("id") Integer id);
}
